import { ApiProperty } from '@nestjs/swagger';
import { IsInt, IsNotEmpty, IsOptional } from 'class-validator';

// dto/create-comment.dto.ts
export class CreateCommentDto {
  @IsNotEmpty()
  @ApiProperty({ 
    description: '评论内容',
  })
  content: string;

  @IsNotEmpty()
  @IsInt()
  @ApiProperty({ 
    description: '评论视频id',
  })
  videoId: number;

  @IsOptional()
  @IsInt()
  @ApiProperty({ 
    description: '父级评论id',
  })
  parentId?: number;

  @IsOptional()
  @IsInt()
  @ApiProperty({ 
    description: '回复评论用户id',
  })
  replyToUserId?: number;
}
